package com.example.myapplication1.dinybehaivor;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.OverScroller;
import android.widget.Toast;
import android.widget.Toolbar;

import androidx.annotation.Nullable;
import androidx.constraintlayout.motion.widget.MotionLayout;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager.widget.ViewPager;

import com.example.myapplication1.R;
import com.example.myapplication1.adapter.FruitAdapter;
import com.example.myapplication1.bean.Fruit;
import com.example.myapplication1.dinyview.DampView;

import java.util.ArrayList;
import java.util.List;

/**
 * Copyright (C), 2020, 重庆八进制有限公司
 *
 * @author: weng
 * @last-modifier: weng
 * @version: 1.0
 * @create-date: 2020/9/1 9:40
 * @last-modify-date: 2020/9/1 9:40
 * @description:
 */
public class MyNestedScrollingActivity extends Activity {
    private static final String TAG = "AnimationActivity1:";

//    private RecyclerView ty_test;
    private DampView dampView;
    private ImageView imageView;
    private RecyclerView nestedview;
    private List<Fruit> fruitList = new ArrayList<>();

    @SuppressLint("ClickableViewAccessibility")
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dingybehaivor);
//        ty_test = findViewById(R.id.ty_test);
        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
//        nestedview = findViewById(R.id.nestedview);
//        nestedview.setLayoutManager(layoutManager);
//        initFruits();
//        FruitAdapter adapter = new FruitAdapter(getApplicationContext(), fruitList);
//        nestedview.setAdapter(adapter);


    }

    private void initFruits() {

        for (int i = 0; i < 2; i++) {
            Fruit apple = new Fruit("Apple", R.drawable.ic_launcher_background);
            fruitList.add(apple);
            Fruit banana = new Fruit("Banana", R.drawable.ic_launcher_background);
            fruitList.add(banana);
            Fruit orange = new Fruit("Orange", R.drawable.ic_launcher_background);
            fruitList.add(orange);
            Fruit watermelon = new Fruit("Watermelon", R.drawable.ic_launcher_background);
            fruitList.add(watermelon);
            Fruit pear = new Fruit("Pear", R.drawable.ic_launcher_background);
            fruitList.add(pear);
            Fruit grape = new Fruit("Grape", R.drawable.ic_launcher_background);
            fruitList.add(grape);
            Fruit pineapple = new Fruit("Pineapple", R.drawable.ic_launcher_background);
            fruitList.add(pineapple);
            Fruit strawberry = new Fruit("Strawberry", R.drawable.ic_launcher_background);
            fruitList.add(strawberry);
            Fruit cherry = new Fruit("Cherry", R.drawable.ic_launcher_background);
            fruitList.add(cherry);
            Fruit mango = new Fruit("Mango", R.drawable.ic_launcher_background);
            fruitList.add(mango);

        }
    }


}
